﻿using System;
using System.Data;
using System.Collections.Generic;

namespace Eneta.Portal.Companies
{
    internal class ProductDataRowComparer : IEqualityComparer<DataRow>
    {
        #region IEqualityComparer<DataRow> Members

        public bool Equals(DataRow x, DataRow y)
        {
            return (x["ProductID"] == y["ProductID"]);
        }

        public int GetHashCode(DataRow obj)
        {
            if (obj == null)
                throw new ArgumentNullException();

            return obj.GetHashCode();
        }

        #endregion
    }
}
